#! /bin/bash
echo "开始配置pip镜像..."
mkdir ~/.pip
echo "[global]
index-url = http://mirrors.blockelite.cn:15019/pip/pypi/+simple/
format = columns
trusted-host = mirrors.blockelite.cn" > ~/.pip/pip.conf
echo "pip镜像已配置：~/.pip/pip.conf"

# 准备YOLOv8运行环境（此处卸载两遍）
pip uninstall ultralytics
pip uninstall ultralytics

# 安装requirements.txt里面的依赖包
pip install -r requirements.txt

pip install timm==0.9.8 thop efficientnet_pytorch==0.7.1 einops grad-cam==1.4.8 dill==0.3.6 albumentations==1.3.1 pytorch_wavelets==1.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install opencv-python install "opencv-python-headless<4.3"

# 安装dyhead需要的包（2080ti安装报错）
#pip install -U openmim
#mim install mmengine -i https://pypi.tuna.tsinghua.edu.cn/simple
#mim install "mmcv>=2.0.0" -i https://pypi.tuna.tsinghua.edu.cn/simple